function hello() {}
const hello1 = function () {}
const hello2 = () => {}

function add(first: number, second: number): number {
  // ():number  表示返回值的返回类型
  return first + second
}

function sayHello(): void {
  // :void 函数没有返回值
  console.log('hello')
}

function errorEmitter(): never {
  throw new Error() // 后面代码不会执行
}

//函数参数解构
function addd({ first, second }: { first: number; second: number }): number {
  return first + second
}

function getNumber({ first }: { first: number; second: boolean }) {}

const total = addd({ first: 1, second: 2 })
